package com.ruoyi.user.domain;

import com.ruoyi.building.domain.Building;
import com.ruoyi.community.domain.Community;
import com.ruoyi.resident.domain.Resident;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 用户对象 t_user
 * 
 * @author ruoyi
 * @date 2023-04-06
 */
public class User extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long id;

    /** 姓名 */
    @Excel(name = "姓名")
    private String username;

    /** 性别 */
    @Excel(name = "性别")
    private Long sex;

    /** 手机 */
    @Excel(name = "手机")
    private String phone;

    /** 微信 */
    @Excel(name = "微信")
    private String wx;

    /** 小区 */
    @Excel(name = "小区")
    private Long communityId;

    /** 楼栋 */
    @Excel(name = "楼栋")
    private Long buildingId;

    /** 住户 */
    @Excel(name = "住户")
    private Long residentId;

    private Building building;
    private Community community;
    private Resident resident;

    public void setBuilding(Building building) {
        this.building = building;
    }

    public void setCommunity(Community community) {
        this.community = community;
    }

    public void setResident(Resident resident) {
        this.resident = resident;
    }

    public Building getBuilding() {
        return building;
    }

    public Community getCommunity() {
        return community;
    }

    public Resident getResident() {
        return resident;
    }

    /** 地址 */
    @Excel(name = "地址")
    private String address;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setUsername(String username) 
    {
        this.username = username;
    }

    public String getUsername() 
    {
        return username;
    }
    public void setSex(Long sex) 
    {
        this.sex = sex;
    }

    public Long getSex() 
    {
        return sex;
    }
    public void setPhone(String phone) 
    {
        this.phone = phone;
    }

    public String getPhone() 
    {
        return phone;
    }
    public void setWx(String wx) 
    {
        this.wx = wx;
    }

    public String getWx() 
    {
        return wx;
    }
    public void setCommunityId(Long communityId) 
    {
        this.communityId = communityId;
    }

    public Long getCommunityId() 
    {
        return communityId;
    }
    public void setBuildingId(Long buildingId) 
    {
        this.buildingId = buildingId;
    }

    public Long getBuildingId() 
    {
        return buildingId;
    }
    public void setResidentId(Long residentId) 
    {
        this.residentId = residentId;
    }

    public Long getResidentId() 
    {
        return residentId;
    }
    public void setAddress(String address) 
    {
        this.address = address;
    }

    public String getAddress() 
    {
        return address;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("username", getUsername())
            .append("sex", getSex())
            .append("phone", getPhone())
            .append("wx", getWx())
            .append("communityId", getCommunityId())
            .append("buildingId", getBuildingId())
            .append("residentId", getResidentId())
            .append("address", getAddress())
            .append("createTime", getCreateTime())
            .toString();
    }
}
